package com.car.serve.client;

import com.car.commons.core.model.Result;
import com.car.serve.client.dto.order.ServiceOrderInfoDto;
import com.car.serve.client.form.StockInsertForm;
import com.car.serve.client.form.findByUserIdForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "order-server", path = "/order")
public interface OrderClient {

    /**
     * 根据门店ID查找当前门店的的所有售后中和已退款的订单
     * 并且返回
     *
     */
    @GetMapping("/serviceOrderInfo/ByClerkIdOrder")
    public Result findByUserIdOrder(@RequestParam("clerkId") Integer clerkId);

    @PostMapping("/stock/insert.ty")
    public Result insert( @RequestBody StockInsertForm form);

    @GetMapping("/serviceOrderInfo/ByServeNum.ty")
    public Result<ServiceOrderInfoDto> findByServeNum(@RequestParam("serveNum") String serveNum);

    @GetMapping("/serviceOrderInfo/tuikuan.ty")
    Result refund(@RequestParam("serveNum") String serveNum);
}
